/*
 * @Author: gaolulu 1402328525@qq.com
 * @Date: 2024-08-09 16:53:12
 * @LastEditors: gaolulu 1402328525@qq.com
 * @LastEditTime: 2024-08-12 17:40:14
 * @FilePath: \insurance_policy_inspect_h5\src\assets\js\interactive.js
 * @Description: 获取手机状态栏高度
 */



export function getStatusBarHeight(obj:any) {
    const ua = navigator.userAgent
    const andoridUAIndex = ua.indexOf('JinShiTong_Android')
    if(andoridUAIndex !== -1 && ua.split('JinShiTong_Android').length == 2){
        const height = ua.split('JinShiTong_Android')[1]
        return `${+height/2}`
    }
    const iosUAIndex = ua.indexOf('JinShiTong_iOS')
    if(iosUAIndex !== -1 && ua.split('JinShiTong_iOS').length == 2){
        const height =  ua.split('JinShiTong_iOS')[1]
        return `${+height}`
    }
    return `20`
}